package com.base.cn.platform.os.controller.user.account;

import com.base.cn.platform.os.common.AdminBaseController;
import com.base.cn.platform.os.service.manage.user.account.CusUserAccountHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * 后台账户
 *
 * @author ll
 * @create 2018-04-25
 */
@Controller
@RequestMapping("/admin/user/cus")
public class AdminCusUserAccountHistoryController extends AdminBaseController {

    @Autowired
    private CusUserAccountHistoryService cusUserAccountHistoryService;
    /**
     * 查看账户详情
     * @paramaccountHistory
     * @return 显示页面
     */
    @RequestMapping("/userAccountHistoryListPage")
    public String userAccountHistoryListPage(Model model, @RequestBody Map<String, Object> accountHistory,
                                             @RequestParam(value = "currentPage",required =false,defaultValue = "1")Integer currentPage){

        Map<String,Object> dataMap =cusUserAccountHistoryService.userAccountHistoryListPage(accountHistory,currentPage,true);
        model.addAttribute("dataMap",dataMap);
        return resultPage("/user/account/students_ajax_sys_accountInfo") ;
    }

}
